Skip to content

Bring the plugin to parity with diffbot 3.4.1 - #3

Merged
shixish merged 7 commits into
mainfrom
feat/sdk-3.4.1-parity
Nov 27, 2026
Merged

shixish merged 7 commits into
mainfrom
feat/sdk-3.4.1-parity

Conversation

@shixish

@shixish shixish commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Bring the Dify plugin to full parity with the Python SDK diffbot 3.4.1: every public capability on the sync Diffbot client gets a plugin tool or credential field.

The plugin is now 0.2.0, pinned to exact diffbot==3.4.1 (the 3.4.1 crawl-flag fix is required; an exact pin matches the current package policy).

New tools

  • kg_query — raw DQL over POST, with named options. JSON/jsonl are scrubbed of email, phone, and html fields and capped at 200,000 characters. csv/xls/xlsx exports are files and are not scrubbed (called out in help and PRIVACY.md).
  • kg_ontology — ontology lookup with an in-memory 24-hour cache (no OntologyStore in 3.4.1; dql_refresh_ontology is excluded because it writes to disk).
  • ask — text or JSON via ask_json / json_schema_format (never a bare json_object). The endpoint is undocumented; help text says so.
  • nlp — single-document NLP; resolve_entities stays on entities().
  • account_usage — plan, status, and usage only; never returns token, childTokens, or email.

Existing tools and credentials

  • Crawl flags are new-named tri-state selects (default / on / off) so a saved obey_robots: false cannot start ignoring robots.txt after the 3.4.1 pin.
  • Remaining crawl-create options, including form-only notify_webhook / notify_email.
  • Web search accepts up to five queries. KG templates gain count_only. Organization industry is still an LLM string, resolved server-side against OrganizationCategory.
  • Extract adds the job type and an optional custom API name (form: form, strict pattern).
  • Credential overrides are the four *_base fields, https only, limited to diffbot.com / *.diffbot.com. verify_token follows api_base. The host guard stays always on.

Out of scope

  • No pull request on langgenius/dify-plugins. The 3.4.0 marketplace validator results are marked stale; 0.2.0 still needs a package build, a validator rerun, and a live smoke test before any submission.
  • enhance_entity stays out (not in the SDK; already removed).

Plan review and implementation review were done by Claude (Opus); implementation was Sonnet, with Opus follow-up fixes.

Test plan

  • New tests in tests/test_parity_3_4_1.py (63 passed locally, plus tests/test_sdk_wiring.py). CI should run the full suite.
  • After merge, before any marketplace submission: build the 0.2.0 .difypkg, rerun the validator, and smoke-test live (including crawl obeyRobots default).

shixish and others added 7 commits November 27, 2026 12:28
…flags

Bump the plugin to 0.2.0. Base URL overrides are https on diffbot.com only.
Crawl robots/proxy/canonical become default|on|off selects with new field
names so saved false values cannot start ignoring robots.txt. Add the crawl
regex, subdomain, notify and multi-header options, plus extract job and
custom API name.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
kg_query scrubs email/phone/html from JSON and caps output; kg_ontology uses
a process-wide cache keyed by ontology URL. Organization industry is resolved
against the OrganizationCategory taxonomy.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ache

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Mark the 3.4.0 validator results stale until rerun on 0.2.0.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- nlp: max_number_of_sentences is 1 to 10, as the SDK documents (was 1 to 50).
- ontology_cache: a non-object ontology document is treated as a failed
  fetch (backoff, stale copy if any) instead of being cached and crashing
  later lookups or industry matching with AttributeError.
- crawl_start: notify_webhook must be https, matching its help text.
- Tests for all three.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- SUBMISSION.md: base URLs can now be overridden (diffbot.com https only),
  so drop "neither credentials nor parameters can change the SDK base URLs"
  and the matching access_domains note; runbook commands and PR body use
  0.2.0; mark the 0.1.0 checksum and validator lines stale inline; remove the
  "PRIVACY.md does not describe crawl" blocker; ontology and hit counts are
  no longer "later version" items.
- PRIVACY.md: say the scrub drops email and phone fields, not every email
  or phone value in free text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shixish
shixish merged commit 33585e8 into main Nov 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant